<!-- Skeleton.vue -->
<template>
  <div class="skeleton-loading">
    <div class="skeleton">
      <div class="skeleton-item card" v-for="i in 4" :key="i"></div>
      <div class="skeleton-item"></div>
      <div class="skeleton-item"></div>
      <div class="skeleton-item" style="width: 334rpx"></div>
      <div class="skeleton-item" style="width: 334rpx"></div>
      <div class="skeleton-item" style="width: 334rpx"></div>
      <div class="skeleton-item" style="width: 334rpx"></div>
    </div>
  </div>
</template>

<script setup></script>

<style lang="less" scoped>
  .skeleton-loading {
    padding: 24rpx 32rpx;
    background: #fff;
  }
  .skeleton {
    display: flex;
    flex-wrap: wrap;
    gap: 16rpx;
  }

  .skeleton-item {
    width: 100%;
    height: 120rpx;
    background-color: #f0f0f0;
    border-radius: 8rpx;
    animation: shimmer 1.5s infinite;
  }

  @keyframes shimmer {
    0% {
      background-position: -468rpx 0;
    }
    100% {
      background-position: 468rpx 0;
    }
  }

  .skeleton-item {
    background: linear-gradient(270deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 936rpx 44rpx;

    &.card {
      width: 334rpx;
      height: 200rpx;
    }
  }
</style>
